home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / Emulation_Include_Files / wceshell.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  7.2 KB  |  207 lines

  1. //===========================================================================
  2. //
  3. // Copyright (c) Microsoft Corporation 1991-1995
  4. //
  5. // File: wceshell.h
  6. //
  7. //===========================================================================
  8. #ifndef __WCESHELL_H_
  9. #define __WCESHELL_H_
  10.  
  11. #include <shlobj.h>    
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18.     
  19. //
  20. // EXPLORERINFO -- Information about current filesystem browser
  21. //
  22. typedef struct _EXPLORERINFO
  23. {
  24.      DWORD uFlags;
  25.     LPSHELLFOLDER lpsf;
  26.     LPITEMIDLIST pidl;
  27.     HWND hwndExplorer;
  28.     HWND hwndListView;
  29.     HWND hwndToolbar;
  30.     HMENU hmenu;
  31.     LONG idCmdFirst;
  32.     UINT idView;
  33.     UINT nSortOrder;
  34.     BOOL fRecycle;
  35.     CEOID oidRoot; // This is nonzero when browsing removable storage
  36.     BOOL fInLabelEdit;
  37.     BOOL fShowBanner;
  38.     DWORD dwData;
  39. } EXPLORERINFO, * LPEXPLORERINFO;
  40. typedef const EXPLORERINFO * LPCEXPLORERINFO;
  41.  
  42.  
  43. //-------------------------------------------------------------------------
  44. //
  45. // IShellListView interface  /* WinCE Only Interface ! */
  46. //
  47. //
  48. // [Member functions]
  49. //
  50. // IShellListView::GetAttributes(prgfInOut)
  51. //   This function returns the state of the command bar for the main window
  52. //   it is called to determine which buttons to put on the explorer command
  53. //   bar.
  54. //
  55. // IShellListView::RegisterFilter(lpfnFilter, dwID)
  56. //   This function is called to register a Shell Filter callback. The
  57. //   dwID will get passed back to the callback along with the PIDL, being
  58. //   refered to. This function will be called to determine if the PIDL
  59. //   should be visible when this vew is visible.
  60. //
  61. // IShellListView::UIActivate(lpED, hmenu, cmdFirst, cmdLast)
  62. //   This function is called when the UI for this view will become visible,
  63. //   your view is alloed to add context senstive verbs to the hmenu, at
  64. //   the begining of the menu and can have commanf id's within the range of
  65. //   cmdFirst and cmdLast.
  66. //
  67. // IShellListView::UIDeactivate(lpED, hmenu, cmdFirst)
  68. //   This function is called when the UI for this view will become invisible,
  69. //   or go away. Your view needs to remove its commands from the menu, and
  70. //   also all items and columns from the ListView hwnd. Anything that that
  71. //   this view has attached the hwnd (ie OLE DropTarget) must also be removed,
  72. //   since the life of the hwnd ListView is not guarenteed when this function
  73. //   is returned.
  74. //
  75. // IShellListView::UpdateContents(lpED)
  76. //   This function is called to refresh the contents of the listview window.
  77. //   THis function is where you can add or remove items from the listview.
  78. //
  79. // IShellListView::ContextMenu(lpED)
  80. //   This function is called to cause you to display the context menu for
  81. //   which should be displayed at this point. This context menu will only
  82. //   be for items 
  83. //
  84. // IShellListView::Notify(lpED, msg, wp, lp)
  85. //   This function is called in response to a WM_NOTIFY, WM_COMMAND,
  86. //   or WM_INITMENUPOPUP for the "File" context menu.
  87. //   
  88. //-------------------------------------------------------------------------
  89.  
  90. #undef     INTERFACE
  91. #define    INTERFACE     IShellListView
  92.  
  93. #define SLVGA_CANDELETE          SFGAO_CANDELETE
  94. #define SLVGA_HASPROPSHEET       SFGAO_HASPROPSHEET
  95. #define SLVGA_HASLARGEICONS      0x00000200L
  96. #define SLVGA_HASSMALLICONS      0x00000400L
  97. #define SLVGA_HASDETAILS         0x00000800L
  98. #define SLVGA_CANGOUPONE         0x00001000L
  99. #define SLVGA_HASNEWFOLDER       0x00002000L
  100. #define SLVGA_DEFAULTBROWSER     0x00008000L
  101. #define SLVGA_DESKTOPWINDOW      0x10000000L
  102.  
  103.  
  104. // The browser object should be able to use the following callback
  105. // to determine whether or not to display a specific PIDL. Browser objects
  106. // do not need to support this, but if the do they must return NOERROR
  107. // to IShellListView::RegisterFilter() and call this routine during any
  108. // repainting or updates.
  109.  
  110. typedef LRESULT (CALLBACK* LPFNSHELLFILTER)(UINT, LPITEMIDLIST);
  111.  
  112.  
  113. DECLARE_INTERFACE_(IShellListView, IUnknown)
  114. {                        
  115.     // *** IUnknown methods ***
  116.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  117.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  118.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  119.  
  120.     // *** IShellListView methods ***
  121.     STDMETHOD(GetAttributes) (THIS_ ULONG *rgfInOut) PURE;
  122.     STDMETHOD(RegisterFilter) (THIS_ LPFNSHELLFILTER lpfnFilter,
  123.                                UINT dwID) PURE;
  124.     STDMETHOD(UIActivate) (THIS_ LPCEXPLORERINFO lped, HMENU hmenu, int cmdFirst,
  125.                            int cmdLast) PURE;
  126.     STDMETHOD(UIDeactivate) (THIS_ LPCEXPLORERINFO lped, HMENU hmenu, int cmdFirst) PURE;
  127.     STDMETHOD(UpdateContents) (THIS_ LPCEXPLORERINFO lped) PURE;
  128.     STDMETHOD(ContextMenu) (THIS_ LPCEXPLORERINFO lped) PURE;
  129.     STDMETHOD(Notify) (THIS_ LPCEXPLORERINFO lped, UINT msg, WPARAM wp, LPARAM lp) PURE;
  130. };
  131.  
  132. typedef IShellListView * LPSHELLLISTVIEW;
  133.  
  134. //
  135. // Borwser Object DLL's must implement this function instead of the OLE
  136. // function DllGetClassObject. The key differance between these two API's
  137. // is that this API returns an object instance instead of an instance of
  138. // the object's class factory.
  139. //
  140. typedef HRESULT (STDAPICALLTYPE * PFNDLLCREATEBROWSEROBJECT) (REFCLSID, REFIID, LPVOID *);
  141. typedef PFNDLLCREATEBROWSEROBJECT LPFNDLLCREATEBROWSEROBJECT;
  142.  
  143. STDAPI DllCreateBrowserObject(REFCLSID rclsid, REFIID riid, LPVOID *ppvObj);
  144.  
  145. //
  146. //  Helper function which loads a Browser object DLL and creates
  147. //  an instance of a Browser object, this object needs to support the
  148. //  interfaces IShellListView and IShellFolder
  149. //
  150.  
  151. WINSHELLAPI
  152. HRESULT
  153. WINAPI
  154. SHCreateBrowserObject(REFCLSID rclsid,
  155.                       REFIID riid,
  156.                       LPVOID *ppv);
  157.  
  158. //-------------------------------------------------------------------------
  159. //
  160. // IShellCommandUI interface  /* WinCE Only Interface ! */
  161. //
  162. // -- This is used to replace the fact that we don't have
  163. //    proper OLE menu merging support on Windows CE.
  164. //
  165. //-------------------------------------------------------------------------
  166. #if defined(_OLEAUTO_H_)
  167.  
  168. #undef     INTERFACE
  169. #define    INTERFACE     IShellCommandUI
  170.  
  171. #define SCUIGA_STOP           0x00000100L
  172. #define SCUIGA_REFRESH        0x00000200L
  173. #define SCUIGA_STARTPAGE      0x00000400L
  174. #define SCUIGA_SEARCHPAGE     0x00000800L
  175.  
  176.  
  177. DECLARE_INTERFACE_(IShellCommandUI, IUnknown)
  178. {                        
  179.     // *** IUnknown methods ***
  180.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  181.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  182.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  183.  
  184.     // *** IShellCommandUI methods ***
  185.     STDMETHOD(GetAttributes) (THIS_ ULONG *rgfInOut) PURE;
  186.     STDMETHOD(CommandUIActivate) (THIS_ HWND hwndToolbar, HMENU hmenu, int cmdFirst,
  187.                                   int cmdLast) PURE;
  188.     STDMETHOD(CommandUIDeactivate) (THIS_ HWND hwndToolbar, HMENU hmenu) PURE;
  189.     STDMETHOD(Navigate)(THIS_ BSTR URL, VARIANT FAR* Flags, VARIANT FAR* TargetFrameName, VARIANT FAR* PostData, VARIANT FAR* Headers) PURE;
  190.     STDMETHOD(Refresh)(THIS) PURE;
  191.     STDMETHOD(HandleCommand) (THIS_ UINT msg, WPARAM wp, LPARAM lp, BOOL *rgfHandled) PURE;
  192. };
  193.  
  194. #define WM_HANDLETAB        (WM_USER+71)
  195.  
  196. typedef IShellCommandUI * LPSHELLCOMMANDUI;
  197.  
  198. #endif //defined(_OLEAUT32_)
  199.  
  200. /////////////////////////////////////////////////////////////////////////////
  201.  
  202. #ifdef __cplusplus
  203. }
  204. #endif
  205.  
  206. #endif /* __WCESHELL_H__ */
  207.